// Copyright 2011 Jefferson Willian
// willmont7@gmail.com

#include <cstdio>

int main() {
  int n;

  scanf("%d", &n);

  /* Calcula fatorial */
  for (int i = n-1;i > 0;i--)
    n *= i;

  if (n == 0)
    n = 1;

  printf("%d", n);

  return 0;
}
